package io.lkt.modules.sys.service;

import com.baomidou.mybatisplus.extension.service.IService;
import io.lkt.common.util.Query;
import io.lkt.common.utils.PageUtils;
import io.lkt.modules.sys.entity.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 用户信息表
 *
 * @author xss
 * @email dustwas@163.com
 * @date 2019-03-09 09:46:37
 */
public interface BUserInfoService extends IService<BUserInfoEntity> {

    PageUtils queryPage(Map<String, Object> params);

    BUserVipValidEntity getVipValid(Integer userId);

    String vipTime(Integer userId);

    Integer addVipLog(Map<String,Object> map);

    Integer vipValidTotal(Integer userId);

    Integer addVipValid(Map<String,Object> map);

    Integer setVipValid(Map<String,Object> map);

    Map<String,Object> mainTotal();

    List<BUserInfoEntity> queryList(Map<String, Object> map);

    List<BUserVitalEntity> queryUserVital(Map<String, Object> map);

    List<BUserVitalEntity> queryUserVitalByGzh(Map<String, Object> map);

    Integer queryUserVitelTotal(Map<String, Object> map);

    String getBrandNameByUserId(Integer userId);

    Integer userTotal(Map<String, Object> map);

    Integer refererTotal(Map<String, Object> map);

    Integer fufei(Integer referer);

    List<BUserInfoEntity> referer(Map<String, Object> map);

    List<BUserInfoEntity> secondReferer(Map<String, Object> map);

    Integer secondTotal(Map<String, Object> map);

    Integer secondFufei(Map<String, Object> map);

    Integer secondRefererTotal(Map<String, Object> map);

    int deleteVirtualVisitUsers(List<String> virtualUserIds,Integer userId);

    List<BrandUserEntity> brandUser(Map<String, Object> map);

    List<BrandUserEntity> brandPayUser(Map<String, Object> map);

    int brandUserTotal(Map<String, Object> map);

    int brandPayUserTotal(Map<String, Object> map);

    BrandUserEntity brandUserHead(Map<String, Object> map);

    int blockByUser(Integer userId);

    int cancelBlockByUser(Integer userId);

    int handle(Integer id);

    List<BtipOffInfoEntity> queryComplainList(Map<String, Object> paramMap);

    Integer queryComplainTotal(Map<String, Object> paramMap);

    List<BUserInfoEntity> queryToDaySubUsers(String gzhCode);

    int updateCensus();

    int blockLinkByUser(Integer userId, Integer blockLinkType);

    List<UserChildrenEntity> getSubordinate(Integer userId);

    BUserInfoEntity getSelfUser(Integer userId);

    List<BUserInfoEntity> getSubUser(Integer userId);

    //获取今天关注该公众号的数量(触发关注数)
    Integer getSubscribeCountByAppId(String appId);

    //获取今天取关该公众号的数量(触发取关数)
    Integer getUnSubscribeCountByAppId(String appId);

    //获取指定日期关注该公众号的数量(触发关注数)
    Integer getSubscribeCountByDate(String gzhCode,String startDate,String endDate);

    //获取指定日期取关该公众号的数量(触发取关数)
    Integer getUnSubscribeCountByDate(String gzhCode,String startDate,String endDate);

    //获取今天取关该公众号的用户数
    Integer getSubUserCountByAppId(String gzhCode);

    //获取今天取关该公众号的用户数
    Integer getUnSubUserCountByAppId(String gzhCode);

    List<BUserPunchClockInfoEntity> getUserClockInfo(Map<String, Object> params);

    Integer getClockInfoTotal(Map<String, Object> params);

    int getSubUserCount(Integer userId);

    Integer queryTodayComplainTotal(Map<String, Object> map);

    BtipOffInfoEntity getLatestComplain(Map<String, Object> map);

    BUserGroupOpenidEntity getMainUserId(Integer userId);

    List<BUserInfoEntity> getUserOtherFollowGzh(Map<String, Object> map);

    Integer getUserOtherFollowGzhTotal(Map<String, Object> map);

    String  getUnionId(Integer userId);

    List<BUserInfoEntity> getReferrerInfo(Map<String, Object> map);

    Integer getReferrerInfoTotal(Map<String, Object> map);

    String getUserName(Integer userId);

    List<BUserInfoEntity> getUnsubscribeUser(Map<String, Object> map);

    Integer getUnsubscribeUserTotal(Map<String, Object> map);

    List<BUserInfoEntity> getNoWorthUser(Map<String, Object> map);

    Integer getNoWorthUserTotal(Map<String, Object> map);

    BUserInfoEntity queryUserInfo(Integer userId);
}

